﻿using System;
using System.Collections.Generic;

namespace Algoritmia.DataStructures.Sets
{
    public class DummySet<T> : ISet<T>
    {
        #region ISet<T> members

        public virtual bool Contains(T elem)
        {
            return false;
        }

        public virtual void Add(T elem)
        {
        }

        public virtual void AddUnchecked(T elem)
        {
        }

        public virtual void Discard(T elem)
        {
        }

        public virtual bool Remove(T elem)
        {
            return false;
        }

        public virtual void Clear()
        {
        }

        #endregion

        #region ICountable members

        public virtual int Count
        {
            get { return 0; }
        }

        #endregion

        #region IEnumerator<T> members

        public virtual IEnumerator<T> GetEnumerator()
        {
            yield break;
        }

        #endregion

        #region IEnumerator members
        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
        #endregion

        #region IEquatable<ISet<T>> members
        public bool Equals(ISet<T> other)
        {
            return false;
        }

        #endregion

        public override string ToString()
        {
            return String.Format("{0} <{1}> {{}}", GetType().Name, typeof(T).Name);
        }
    }
}
